package com.fishery.base.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fishery.base.entity.SupplyIn;
import com.baomidou.mybatisplus.extension.service.IService;
import com.fishery.base.entity.vo.BaseSupplyAccessVo;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * <p>
 * 投入品入库管理服务类
 * </p>
 *
 * @author Ghost
 * @since 2021-01-15
 */
public interface SupplyInService extends IService<SupplyIn> {

	/**
	 * 根据基地ID分页获取投入品的入库信息
	 *
	 * @param baseId
	 * @param size
	 * @param current
	 * @return
	 */
	Page<SupplyIn> pageSuppyInRecords(String baseId, int size, int current);

	/**
	 * 根据基地ID、投入品ID分页获取某种投入品的入库信息
	 *
	 * @param baseId
	 * @param supplyId
	 * @param size
	 * @param current
	 * @return
	 */
	Page<SupplyIn> pageSuppyInRecords(String baseId, String supplyId, int size, int current);

	/**
	 * 修改投入品的入库记录
	 *
	 * @param supplyIn
	 * @return
	 */
	boolean updateSupplyInRecord(SupplyIn supplyIn);

	/**
	 * 创建投入品入库信息
	 *
	 * @param supplyIn
	 * @return
	 */
	boolean createSupplyInRecord(SupplyIn supplyIn);

	/**
	 * 将投入品入库记录以Excel文件格式导出
	 *
	 * @param response
	 * @param baseId
	 */
	void getSupplyInRecordsByExcel(HttpServletResponse response, String baseId);

	/**
	 * 通过基地ID获取基地投入品的入库数量信息
	 *
	 * @param baseId
	 * @return
	 */
	List<BaseSupplyAccessVo> getAmountInfoOfBaseSupplyIn(String baseId);
}
